/**
 * 
 */
package com.java.test.user.dto;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

import org.springframework.jdbc.core.RowMapper;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author 玩家账号信息
 *
 */
public class PlayAccountInfo implements RowMapper<PlayAccountInfo> {

	// 主键id
	private int id;
	
	// 昵称
	private String nickName;
	

	// 账号
	private String account;

	// 账号名称
	private String accountName;

	// 账号类型
	private int accountType;

	// 所属分层
	private int sliceValue;

	// 分层名称
	private String sliceName;

	// 当前等级
	private int gradeValue;

	// 等级名称
	private String gradeName;

	// 当前余额
	private Double curAmount;

	// 冻结金额
	private Double frozenAmount;

	// 所在地区id
	private int areaId;

	// 所在地区名称
	private String areaName;

	// 账号状态 (1:正常 0:禁用)
	private int accountStatus;

	// 注册时间
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime registerTime;
	
	// 注册时间
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private LocalDateTime loginTime;
	

	// 注册渠道
	private String registerChannel;

	// 备注
	private String remarks;
	
	// 玩家备注
	private String playerRemarks;
	
	private String gameAdd;
	
	
	private String loginIp;
	
	
	// 电话
	private String phoneNumber;
	
	// 有效投注
	private double effectBet; 
	
	// 有效投注余额
	private double effectBetBalance;
	
	// 存款
	private double cunkuan;
	
	// 提款
	private double tikuan;
	
	// 盈
	private double yin;
	
	// 打码
	private double daCoding;
	
	// 打码需要
	private double  daCodingxu;
	
	
	// 货币类型id
	private String foundTypeId;
	

	// 存款成功金额
	private double recharge_amount;
	
	
	

	public double getRecharge_amount() {
		return recharge_amount;
	}

	public void setRecharge_amount(double recharge_amount) {
		this.recharge_amount = recharge_amount;
	}

	public String getFoundTypeId() {
		return foundTypeId;
	}

	public void setFoundTypeId(String foundTypeId) {
		this.foundTypeId = foundTypeId;
	}



	public LocalDateTime getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(LocalDateTime loginTime) {
		this.loginTime = loginTime;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public double getEffectBet() {
		return effectBet;
	}

	public void setEffectBet(double effectBet) {
		this.effectBet = effectBet;
	}

	public double getEffectBetBalance() {
		return effectBetBalance;
	}

	public void setEffectBetBalance(double effectBetBalance) {
		this.effectBetBalance = effectBetBalance;
	}

	public double getCunkuan() {
		return cunkuan;
	}

	public void setCunkuan(double cunkuan) {
		this.cunkuan = cunkuan;
	}

	public double getTikuan() {
		return tikuan;
	}

	public void setTikuan(double tikuan) {
		this.tikuan = tikuan;
	}

	public double getYin() {
		return yin;
	}

	public void setYin(double yin) {
		this.yin = yin;
	}

	public double getDaCoding() {
		return daCoding;
	}

	public void setDaCoding(double daCoding) {
		this.daCoding = daCoding;
	}

	public double getDaCodingxu() {
		return daCodingxu;
	}

	public void setDaCodingxu(double daCodingxu) {
		this.daCodingxu = daCodingxu;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public String getGameAdd() {
		return gameAdd;
	}

	public void setGameAdd(String gameAdd) {
		this.gameAdd = gameAdd;
	}

	public int getAccountType() {
		return accountType;
	}

	public void setAccountType(int accountType) {
		this.accountType = accountType;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public int getSliceValue() {
		return sliceValue;
	}

	public void setSliceValue(int sliceValue) {
		this.sliceValue = sliceValue;
	}

	public String getSliceName() {
		return sliceName;
	}

	public void setSliceName(String sliceName) {
		this.sliceName = sliceName;
	}

	public int getGradeValue() {
		return gradeValue;
	}

	public void setGradeValue(int gradeValue) {
		this.gradeValue = gradeValue;
	}

	public String getGradeName() {
		return gradeName;
	}

	public void setGradeName(String gradeName) {
		this.gradeName = gradeName;
	}

	public Double getCurAmount() {
		return curAmount;
	}

	public void setCurAmount(Double curAmount) {
		this.curAmount = curAmount;
	}

	public Double getFrozenAmount() {
		return frozenAmount;
	}

	public void setFrozenAmount(Double frozenAmount) {
		this.frozenAmount = frozenAmount;
	}

	public int getAreaId() {
		return areaId;
	}

	public void setAreaId(int areaId) {
		this.areaId = areaId;
	}

	public String getAreaName() {
		return areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	public int getAccountStatus() {
		return accountStatus;
	}

	public void setAccountStatus(int accountStatus) {
		this.accountStatus = accountStatus;
	}

	public LocalDateTime getRegisterTime() {
		return registerTime;
	}

	public void setRegisterTime(LocalDateTime registerTime) {
		this.registerTime = registerTime;
	}

	public String getRegisterChannel() {
		return registerChannel;
	}

	public void setRegisterChannel(String registerChannel) {
		this.registerChannel = registerChannel;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getAccountName() {
		return accountName;
	}

	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}
	
	
	

	public String getPlayerRemarks() {
		return playerRemarks;
	}

	public void setPlayerRemarks(String playerRemarks) {
		this.playerRemarks = playerRemarks;
	}

	@Override
	public PlayAccountInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
		PlayAccountInfo info = new PlayAccountInfo();
		info.setAccount(rs.getString("account"));
		info.setAccountType(rs.getInt("account_type"));
		info.setAccountStatus(rs.getInt("account_status"));
		info.setAreaId(rs.getInt("area_id"));
		info.setAreaName(rs.getString("area_name"));
		info.setCurAmount(rs.getDouble("cur_amount"));
		info.setFrozenAmount(rs.getDouble("frozen_amount"));
		info.setGradeName(rs.getString("grade_name"));
		info.setGradeValue(rs.getInt("grade_value"));
		info.setId(rs.getInt("id"));
		info.setRegisterChannel(rs.getString("register_channel"));
		info.setRegisterTime(
				rs.getTimestamp("register_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());
		info.setRemarks(rs.getString("remarks"));
		info.setSliceName(rs.getString("slice_name"));
		info.setSliceValue(rs.getInt("slice_value"));
		info.setAccountName(rs.getString("AccountName"));
		
		
		
		info.setPhoneNumber(rs.getString("phone_number"));
		info.setEffectBet(rs.getDouble("effect_bet"));
		info.setEffectBetBalance(rs.getDouble("effect_betbalance"));
		info.setCunkuan(rs.getDouble("cunkuan"));
		info.setTikuan(rs.getDouble("tikuan"));
		info.setYin(rs.getDouble("yin"));
		info.setDaCoding(rs.getDouble("dacoding"));
		info.setDaCodingxu(rs.getDouble("dacoding_xu"));
		info.setLoginTime(rs.getTimestamp("login_time") == null ? null
				: rs.getTimestamp("login_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());
		info.setRemarks(rs.getString("remarks"));
		info.setPlayerRemarks(rs.getString("player_remarks"));
		info.setNickName(rs.getString("nick_name"));
		info.setFoundTypeId(rs.getString("foundTypeId"));
		info.setRecharge_amount(rs.getDouble("recharge_amount"));
		
	
		return info;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

}
